package com.bingbing.back.myUtils;

import com.bingbing.back.dto.SchoolDist;
import com.bingbing.back.dto.SchoolInfoDto;
import com.bingbing.back.dto.SchoolMajorScoreDto;

import java.util.Comparator;
import java.util.List;

public class MyCompare implements Comparator<SchoolDist> {
    @Override
    public int compare(SchoolDist o1, SchoolDist o2) {
        return Double.compare(o1.getDist(), o2.getDist());
    }
}

class MyCompare1 implements Comparator<SchoolInfoDto> {
    public int compare(SchoolInfoDto dto1, SchoolInfoDto dto2){
        return Double.compare(dto1.getProbability(), dto2.getProbability());
    }
}

class MyCompare2 implements Comparator<SchoolMajorScoreDto> {
    public int compare(SchoolMajorScoreDto dto1, SchoolMajorScoreDto dto2){
        return Double.compare(dto1.getProbability(), dto2.getProbability());
    }
}
